package auth

import (
	"context"
	v1 "zuhao-seucre/api/auth/v1"
	"zuhao-seucre/internal/boot/cache"
)

func (c *ControllerV1) Clear(ctx context.Context, req *v1.ClearReq) (res *v1.ClearRes, err error) {
	res = new(v1.ClearRes)
	err = cache.Instance().Clear(ctx)
	if err != nil {
		res.Msg = "清空失败"
		return
	}
	res.Msg = "清空成功"
	return
}
